<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Document</title>
	</head>
	<body>
		<script type="text/javascript">
			//module.js文件
			function foo(){
				console.log('foo');
			}
			function bar(){
				console.log('bar');
			}
			export {foo,bar};
			......
			//my_module.js文件
			export {foo,bar} from './module.js';
			//等价于
			//import {foo,bar} from 'my_module';
			//export {foo,bar};
			......
			//index.html文件
			import {foo,bar} from './my_module.js'
			foo();
			
			//普通改名
			export {foo as bar} from "methods";
			//将foo转导成default
			export {foo as default} from "methods";
			//将default转导成foo
			export {default as foo} from "methods";
		</script>
	</body>
</html>